package com.vrp3d.mapper;

import com.vrp3d.domain.dto.dist.DistForFrontDTO;
import com.vrp3d.domain.po.Dist;
import com.vrp3d.domain.po.DistExample;
import com.vrp3d.domain.po.DistWithBLOBs;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 字典
 *
 * @author vrp3d
 */
@Repository
public interface DistMapper {
    int countByExample(DistExample example);

    int deleteByExample(DistExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(DistWithBLOBs record);

    int insertSelective(DistWithBLOBs record);

    List<DistWithBLOBs> selectByExampleWithBLOBs(DistExample example);

    List<Dist> selectByExample(DistExample example);

    DistWithBLOBs selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") DistWithBLOBs record, @Param("example") DistExample example);

    int updateByExampleWithBLOBs(@Param("record") DistWithBLOBs record, @Param("example") DistExample example);

    int updateByExample(@Param("record") Dist record, @Param("example") DistExample example);

    int updateByPrimaryKeySelective(DistWithBLOBs record);

    int updateByPrimaryKeyWithBLOBs(DistWithBLOBs record);

    int updateByPrimaryKey(Dist record);

    /**
     * 根据类型查询_包含下级分类
     *
     * @param type
     * @param status
     * @return
     */
    List<DistForFrontDTO> findListByTypeContainsSubordinates(@Param("type") String type, @Param("status") Integer status);
}